/* IE6 doesnt support hover well, need javascript to do the mouse over */
function set_ul_display_block()
{
    var x;
    for (x = 0; x < this.childNodes.length; x++) {
	if (this.childNodes[x].nodeName == "UL") {
		this.childNodes[x].style.display = "block";
		this.childNodes[x].style.position = "absolute";
	}
    }
}

function set_ul_display_none()
{
    var x;
    for (x = 0; x < this.childNodes.length; x++) {
	if (this.childNodes[x].nodeName == "UL") {
	    this.childNodes[x].style.display = "none";
	}
    }
}

function get_submenu(node_ul) {
    var i, j, node, node_ul, lchlid;
    for (i = 0; i < node_ul.childNodes.length; i++) {
	node = node_ul.childNodes[i];
	if (node.nodeName == "LI") {
	    for (j = 0; j < node.childNodes.length; j++) {
		lchild = node.childNodes[j];
		if (lchild.nodeName == "UL") {
		    node.onmouseover = set_ul_display_block;
		    node.onmouseout = set_ul_display_none;
		    get_submenu(lchild);
		}
	    }
	}
    }
}

startList = function() {
    if (document.all && document.getElementById) {
	navRoot = document.getElementById("nav");
	get_submenu(navRoot);
    }
}
if (window.attachEvent)
    window.attachEvent("onload", startList)
else
    window.onload=startList;
